package com.lz.ovuola.util.threadlocal;

public final class UserContextHolder {
	private static final ThreadLocal<UserContext> USER_CONTEXT = new ThreadLocal<UserContext>();

	private UserContextHolder() throws Exception {
		throw new Exception("禁止创建UserContextHolder");
	}

	public static void set(UserContext userContext) {
		USER_CONTEXT.set(userContext);
	}

	public static UserContext get() {
		return USER_CONTEXT.get();
	}

	public static void remove() {
		USER_CONTEXT.remove();
	}
}
